class  cup:
    height=0
    rongji=0
    yanse=""
    caizhi=""

    def cunfang(self,yeti):
        print(self.caizhi,self.height,"cm",self.yanse,"水杯在桌子上放着！","里面装着",yeti,self.rongji,"ml")
c = cup()
c.height=30
c.rongji=200
c.yanse="蓝色"
c.caizhi="不锈钢"
c.cunfang("果粒橙")



import time
class computer:
    pingmu=0
    jiage=0
    cpu=0
    neicun=0
    daiji=0
    def dazi(self,name,hours):
        print(name,self.pingmu,"屏幕",self.cpu,"处理器",self.neicun,"内存","待机",self.daiji,"可以连续打字",\
              hours,"小时")

    def playgame(self,name,hours):
        print(name,self.pingmu,"屏幕",self.cpu,"处理器",self.neicun,"内存","待机",self.daiji,"可以连续打游戏",\
              hours,"小时")

    def looksp(self,name,hours):
        print(name,self.pingmu,"屏幕",self.cpu,"处理器",self.neicun,"内存","待机",self.daiji,"可以连续看视频",\
              hours,"小时")
        for i in range(6):
            print("*",end="")
            time.sleep(1)
        print("\n注意休息，合理使用眼睛！")
    def diannao(self,name):
        print("名称：",name,"  屏幕尺寸：",self.pingmu,"  价格：",self.jiage,"  处理器：",self.cpu,\
              "  内存大小：",self.neicun,"  待机时长",self.daiji)

c=computer()

c.pingmu="15寸"
c.jiage="5000元"
c.cpu="酷睿i5"
c.neicun="512G"
c.daiji="10小时"

c.dazi("戴尔",8)
c.playgame("戴尔",8)
c.looksp("戴尔",8)
c.diannao("戴尔")


